Skip to content

fix: rescore completions when scoring settings change - #587

Draft
Yeagerist0 wants to merge 1 commit into
adeyosemanputra:masterfrom
Yeagerist0:fix/rescore-on-settings-change
Draft

Yeagerist0 wants to merge 1 commit into
adeyosemanputra:masterfrom
Yeagerist0:fix/rescore-on-settings-change

Conversation

@Yeagerist0

Copy link
Copy Markdown
Contributor

Summary

Recalculate completed lab and challenge scores when global scoring settings change. Previously, changing the base points or time multipliers left existing scores based on the old settings, even though difficulty changes already trigger a recalculation.

Changes

  • Recompute completed scores after a ScoringSettings update, preserving each challenge's own points and each lab or challenge difficulty multiplier.
  • Add regression tests for a base-point change and a time-bonus change.

Validation

  • Reproduced the stale score with a failing regression test before the fix.
  • python manage.py test --verbosity 1: 56 tests passed.
  • python manage.py makemigrations --check --dry-run: no changes detected.
  • git diff --check: passed.

LLM Usage Considerations

OpenAI Codex assisted with the implementation, tests, and this description. The automated test suite was run locally. Contributor review is pending; this PR is a draft for that review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant